Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/alloc: allocated URL to clipboard does not work on Linux #16

Merged
merged 2 commits into from
Nov 7, 2021

Conversation

Summuss
Copy link
Contributor

@Summuss Summuss commented Nov 6, 2021

clipboard.write does't work on my linux device when main goroutine exit immediately after it return, which cause allocated url can't be written into clipboard. So to fix it, I make writing clipboard operation block util clipboard is updated to guarantee clipboard can be written into successfully.

@changkun
Copy link
Owner

changkun commented Nov 6, 2021

Thanks for the interesting find! But I guess this change will block the alloc command, how about that we change the Write operation to the daemon side because daemon is running in the background and wont exit anyway?

@Summuss
Copy link
Contributor Author

Summuss commented Nov 7, 2021

I agree. It's definitely a better idea. In fact, daemon rpc service had written url to clipboard, but it lose effectiveness after write operation in alloc command.

Copy link
Owner

@changkun changkun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for discovering the bug!

@changkun changkun changed the title fix: writing allocated url to clipboard doesn't work on some linux d… cmd/alloc: allocated URL to clipboard does not work on Linux Nov 7, 2021
@changkun changkun merged commit 4de6d58 into changkun:main Nov 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants